#ifndef USERINFO_H
#define USERINFO_H

#include <QString>
#include <QMap>
#include <QStringList>

class UserInfo
{
public:
    UserInfo();
    UserInfo(int id, const QString &name,const QString &head);

    int m_id;
    int m_statu;
    QString m_name;
    QString m_pswd;
    QString m_head;
};

class UserInfoList
{
public:
    UserInfoList();

    int m_userCount;

    UserInfo getUserInfo(QString name);
    QStringList &getUserNameList();

    void appendUserInfo(const UserInfo &info);
    void removeUserInfo(const QString &name);
    bool isExistUser(const QString &name);
private:
    QStringList m_userNameList;
    QMap<QString, UserInfo> m_userInfoMap; //uName, uInfo
};

#endif // USERINFO_H
